<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>let</title>
</head>

<body>
    <script>
        let a;
        let b, c, d;
        let f = 521, g = 'iloveyou', h = [];

        //1. 变量不能重复申明
        // let star = 1;
        // let star = 2;

        //2. 块级作用域
        // {
        //     let girl = 'aaa';
        // }
        // console.log(girl);

        //3. 不存在变量提升
        // console.log(song);
        // let song = 'xxx';

        //4. 不影响作用域链
        {
            let school = 'aa';
            function fn() {
                console.log(school);
            }
            fn();
        }
    </script>
</body>

</html>